package com.deli.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @author youzi
 * @date 2018-07-23 11:37
 */
public class ParamUtil {
    /**
     * 参数判空
     *
     * @param param
     * @param paramName
     * @return
     */
    public static String checkParam(Object param, String paramName) throws Exception {
        if (param == null) {
            throw new Exception(paramName + "参数为空");
        }
        if (StringUtils.isBlank(param.toString())) {
            throw new Exception(paramName + "参数为空串");
        }
        return param.toString();
    }
}
